package day020;

import java.io.FileNotFoundException;
import java.io.PrintStream;

public class PrintStreamDemo2 {
    public static void main(String[] args) throws FileNotFoundException {
        System.out.println("数据打印在控制台");

        System.setOut(new PrintStream("D:\\day020\\print.txt"));

        System.out.println("数据打印在文件中");
    }
}
